import { request } from './request';

export function getVideoDetail(id) {
  return request({
    url: `/video/${id}`,
  });
}

export function getVideoSource(id) {
  return request({
    url: `/video/${id}/playinfo?is_try=0`,
  });
}

export function getVideoComments(id) {
  return request({
    url: `/video/${id}/comments`,
  });
}

export function commentCourse(id, data) {
  return request({
    url: `/video/${id}/comment`,
    method: 'post',
    data,
  });
}
